import request from '@/utils/request'

export function getExchanges(query) {
  return request({
    url: '/knowledge/exchange/getList',
    method: 'post',
    data: query
  })
}

export function getExchange(id) {
  return request({
    url: '/knowledge/exchange/getDetail',
    method: 'post',
    data: id
  })
}
export function changeStatusByExchangeID(id) {
  return request({
    url: '/knowledge/exchange/change-status',
    method: 'post',
    data: id
  })
}

export function saveExchange(formdata) {
  return request({
    url: '/knowledge/exchange/save',
    method: 'post',
    data: formdata
  })
}

export function deleteExchangeByID(id) {
  return request({
    url: '/knowledge/exchange/delete',
    method: 'post',
    data: id
  })
}
export function removeExchangeByID(id) {
  return request({
    url: '/knowledge/exchange/remove',
    method: 'post',
    data: id
  })
}

export function getExchangeAvabile() {
  return request({
    url: '/knowledge/exchange/getAvailable',
    method: 'post'
  })
}
